package com.ssm.crud.service;

import com.ssm.crud.dao.DepartmentMapper;
import com.ssm.crud.entities.Department;
import com.ssm.crud.entities.EmployeeExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/11/16 17:19
 */
@Service
public class DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    public List<Department> getDepts() {
        //查出所有的部门信息
        EmployeeExample employeeExample = new EmployeeExample();
        List<Department> departments = departmentMapper.selectByExample(null);
        return departments;
    }
}
